Skip to content

Add Interactions API skill#8

Open
Antovex wants to merge 8 commits intogoogle-gemini:mainfrom
Antovex:add-interactions-api-skill
Open

Add Interactions API skill#8
Antovex wants to merge 8 commits intogoogle-gemini:mainfrom
Antovex:add-interactions-api-skill

Conversation

@Antovex
Copy link

@Antovex Antovex commented Feb 10, 2026

Fixes #6

This PR adds a new skill for the Gemini Interactions API as requested.

Changes:

  • Created new skill directory skills/interactions-api/
  • Added SKILL.md with documentation about the Interactions API
  • Updated README.md to list the new skill

Adds documentation for the Gemini Interactions API as requested in issue google-gemini#6.
Includes overview, quick start examples, best practices, and common use cases.
@google-cla
Copy link

google-cla bot commented Feb 10, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Antovex, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new skill designed to facilitate the development of interactive conversational applications using the Gemini Interactions API. It provides structured guidance and best practices for managing conversation state and turn-based interactions, enhancing the project's capabilities for building sophisticated chat experiences.

Highlights

  • New Skill Introduction: A new skill for the Gemini Interactions API has been added, enabling the creation of interactive chat experiences.
  • Documentation: Comprehensive documentation for the Interactions API skill has been included in SKILL.md.
  • Project Visibility: The main README.md has been updated to list and describe the newly added interactions-api skill.
Changelog
  • README.md
    • Added a new section detailing the interactions-api skill, including its purpose and installation command.
  • skills/interactions-api/SKILL.md
    • Created a new documentation file outlining the Gemini Interactions API skill, its overview, quick start examples, resources, best practices, and common use cases.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new skill for the Gemini Interactions API, which is a valuable addition. The documentation provides a good overview, but the quick-start code examples are currently just placeholders. My review includes suggestions to replace these placeholders with complete, minimal, and working examples for both Python and JavaScript/TypeScript. These changes will make the skill much more useful for developers looking to get started with interactive chat experiences.

Antovex and others added 2 commits February 11, 2026 00:44
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

### Python
```python
import google.generativeai as genai
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the main drivers for this skill is to stop LLMs from using this deprecated SDK. I don't mind if you use an LLM to bootstrap the skill but please 1) test it and 2) use the gemini-api-dev skill.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested all the example code locally and have referenced the gemini-api-dev skill. I have made few commits regarding the same. please check it out and let me know if any changes are required.

@Antovex
Copy link
Author

Antovex commented Feb 11, 2026

Hi @markmcd, thanks for the review and the callout about the deprecated SDK.
I updated SKILL.md to use the current google-genai / @google/genai SDK patterns and replaced the examples with Interactions API calls (stateful and stateless multi-turn examples). I tested the Python and JavaScript snippets locally with my API key and verified the previous_interaction_id flow works.
I also added a reference to the canonical skills/gemini-api-dev guidance for SDK installation, model recommendations, and migration notes.
Please let me know if you'd like any further adjustments.

@Antovex Antovex requested a review from markmcd February 11, 2026 13:06
@Vikxlife
Copy link

I need to see the matching files first

@Antovex
Copy link
Author

Antovex commented Feb 12, 2026

I need to see the matching files first

@Vikxlife which files are you talking about ?

@markmcd markmcd requested a review from philschmid February 13, 2026 00:06
@markmcd
Copy link
Member

markmcd commented Feb 13, 2026

Awesome thank you @Antovex. Hey @philschmid would you mind taking a look at this too?

@Antovex
Copy link
Author

Antovex commented Feb 16, 2026

Hi @philschmid , do let me know if there are any changes required.


### Python
```python
import google.generativeai as genai

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update this to match the official docs.

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will include the same imports as official documentation

- **State Management** - Maintain conversation context across interactions (stateful or stateless)
- **Turn-based Communication** - Structured request/response patterns
- **Session Handling** - Manage conversation sessions efficiently with interaction IDs
- **Multimodal Support** - Process text, images, audio, video, and documents

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include tool use capabilties and agent support

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioning tool and function calling here.


## Resources

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent don't have context about ../ links

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for now I am giving the reference for this file using the full github path to that file, but if it needs to be changes do let me know.

## Resources

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only have the .md version

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating it to use .md file


- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agents cannot access easilly colab, we should remove

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the mention of colab.

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)
- [API Reference](https://ai.google.dev/api/interactions-api)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be the markdown version

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will use md version

- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)
- [API Reference](https://ai.google.dev/api/interactions-api)
- [Gemini API Documentation](https://ai.google.dev/gemini-api/docs/llms.txt)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve title

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it to "Gemini API llms.txt" for now, but if something better can be used for this, do let me know.

Comment on lines 263 to 269
## Best Practices

1. **Use Stateful Conversations**: Leverage `previous_interaction_id` for automatic state management instead of manually tracking history
2. **Handle Storage**: Interaction objects are saved by default (`store=true`). Be mindful of data retention policies
3. **Error Handling**: Implement robust error handling for network and API issues
4. **Rate Limiting**: Be mindful of API rate limits in interactive scenarios
5. **Beta Considerations**: The API is in Beta and subject to breaking changes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't feel helpful for using the skill and more general developer principles should live outside.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then i will totally remove this.

Comment on lines 273 to 278
- Multi-turn chatbots with context awareness
- Interactive assistants with session management
- Conversational interfaces with multimodal inputs
- Context-aware Q&A systems
- Document analysis and understanding
- Image, audio, and video processing workflows

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include agents and tool use

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will mention that here.


---

For more details, refer to the [official documentation](https://ai.google.dev/gemini-api/docs/interactions). No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be markdown link or removed as it is part further up

Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it.

Copy link
Author

@Antovex Antovex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soon there will be a commit with all the changes mentioned, do check it and let me know if there is any refactoring required.

- **State Management** - Maintain conversation context across interactions (stateful or stateless)
- **Turn-based Communication** - Structured request/response patterns
- **Session Handling** - Manage conversation sessions efficiently with interaction IDs
- **Multimodal Support** - Process text, images, audio, video, and documents
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioning tool and function calling here.


### Python
```python
import google.generativeai as genai
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will include the same imports as official documentation


## Resources

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for now I am giving the reference for this file using the full github path to that file, but if it needs to be changes do let me know.

## Resources

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating it to use .md file


- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the mention of colab.

- See the [gemini-api-dev skill](../gemini-api-dev/SKILL.md) for canonical SDK guidance (installation, migration notes, and recommended models such as the google-genai / @google/genai SDKs).
- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)
- [API Reference](https://ai.google.dev/api/interactions-api)
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will use md version

- [Official Interactions API Documentation](https://ai.google.dev/gemini-api/docs/interactions)
- [Interactions API Quickstart Notebook](https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb)
- [API Reference](https://ai.google.dev/api/interactions-api)
- [Gemini API Documentation](https://ai.google.dev/gemini-api/docs/llms.txt)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it to "Gemini API llms.txt" for now, but if something better can be used for this, do let me know.

Comment on lines 263 to 269
## Best Practices

1. **Use Stateful Conversations**: Leverage `previous_interaction_id` for automatic state management instead of manually tracking history
2. **Handle Storage**: Interaction objects are saved by default (`store=true`). Be mindful of data retention policies
3. **Error Handling**: Implement robust error handling for network and API issues
4. **Rate Limiting**: Be mindful of API rate limits in interactive scenarios
5. **Beta Considerations**: The API is in Beta and subject to breaking changes
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then i will totally remove this.

Comment on lines 273 to 278
- Multi-turn chatbots with context awareness
- Interactive assistants with session management
- Conversational interfaces with multimodal inputs
- Context-aware Q&A systems
- Document analysis and understanding
- Image, audio, and video processing workflows
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will mention that here.


---

For more details, refer to the [official documentation](https://ai.google.dev/gemini-api/docs/interactions). No newline at end of file
Copy link
Author

@Antovex Antovex Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it.

Added sections on tool use and function calling to the Interactions API documentation. Updated best practices and resources for better guidance.
@Antovex Antovex requested a review from philschmid February 19, 2026 18:47
@Tai-ch0802
Copy link

I have an idea: is the name skills/interactions-api not accurate enough?
During the user's skill installation process, the mere mention of interactions-api doesn't seem to intuitively convey the connection between this skill and the Gemini API.

  • Perhaps it would be better to prefix it with gemini-? e.g. gemini-interactions-api
  • Alternatively, you can directly name it after the file. For example, genai-interactions-api or google-genai-interactions-api.

@Antovex
Copy link
Author

Antovex commented Feb 23, 2026

I have an idea: is the name skills/interactions-api not accurate enough? During the user's skill installation process, the mere mention of interactions-api doesn't seem to intuitively convey the connection between this skill and the Gemini API.

  • Perhaps it would be better to prefix it with gemini-? e.g. gemini-interactions-api
  • Alternatively, you can directly name it after the file. For example, genai-interactions-api or google-genai-interactions-api.

This is a good idea !! Would do if any of the reviewers or maintainers approve it.

@Vikxlife
Copy link

Soon there will be a commit with all the changes mentioned, do check it and let me know if there is any refactoring required.

do you work remotely? @Antovex ?

@Antovex
Copy link
Author

Antovex commented Feb 24, 2026

Soon there will be a commit with all the changes mentioned, do check it and let me know if there is any refactoring required.

do you work remotely? @Antovex ?

Yes, I do. Could you clarify what you mean by 'remotely' in this context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactions API - Possible?

5 participants